<template>
	<view class="container">
		<view class="container-head">
			<view class="container-head-icon">
				<!-- <image src="@/static/daizhifu.png" mode="aspectFill"></image> -->
				<!-- <image src="@/static/daifahuo.png" mode="aspectFill"></image> -->
				<image src="@/static/dais.png" mode="aspectFill"></image>
				<view style="margin-top: 15rpx;">待支付</view>
			</view>
			<view class="container-head-text">剩余时间：12:36:06</view>
		</view>
		<view class="container-aside">
			<image src="@/static/address-icon.png" mode="aspectFill"></image>
			<view class="container-aside-addr">
				<view>厦门市区湖里区王海国际208号21楼205</view>
				<view>小张 1732250018</view>
			</view>
		</view>
		<view class="container-info">
			<view class="container-info-left">
				<image src="../../static/icon_shopping_bag.png" mode="aspectFill"></image>
			</view>
			<view class="container-info-right">
				<view class="container-info-right-title">石墨烯商务POLO衫抗菌透气吸湿速干T恤经典百搭款</view>
				<view class="container-info-right-space">黑色；xl</view>
				<view class="container-info-right-money">
					<view>&yen;597.33</view>
					<view>x1</view>
				</view>
			</view>
		</view>

		<view class="container-card">
			<view class="container-card-cell">
				<view>订单类型:</view>
				<view>普通订单</view>
			</view>
			<view class="container-card-cell">
				<view>订单编号:</view>
				<view>2020202020202020</view>
			</view>
			<view class="container-card-cell">
				<view>订单交易号:</view>
				<view>9999999999999999</view>
			</view>
			<view class="container-card-cell">
				<view>创建时间:</view>
				<view>2020-17-50 17:50:50</view>
			</view>
			<view class="container-card-cell">
				<view>配送方式:</view>
				<view>快递发货</view>
			</view>
		</view>

		<view class="container-footer">
			<!-- <view class="container-footer-btn">查看物流</view>	 -->
			<view class="container-footer-btn">关闭订单</view>
			<view class="orgin">支付</view>
		</view>
	</view>
</template>

<script>
	import request from "@/api/request.js"
	export default {
		data() {
			return {
               orderDto: {
				token: '',
				order_no: ''
			   }
			}
		},
		onLoad(options) {
           this.orderDto.token = uni.getStorageSync('token')
		   this.orderDto.order_no = options.orderNo
		   this.getOrderDetails()
		},
		methods: {
			getOrderDetails() {
				request({
					url: '/kx/shopOrder/orderDetail',
					data:  this.orderDto,
					method: 'POST',
					successCb(res) {
						uni.hideLoading()
						uni.$u.toast('关闭成功')
					},
					failCb() {
						uni.hideLoading()
						uni.$u.toast('关闭失败')
					}
				})
			}
		}


	}
</script>

<style lang="scss" scoped>
	.orgin {
		width: 130rpx;
		text-align: center;
		border-radius: 50rpx;
		font-size: 24rpx;
		margin: 0 10rpx;
		background: #FF8732;
		color: #fff;
		height: 47rpx;
		line-height: 47rpx;
	}

	.container {
		background-color: #F3F3F3;
		min-height: 100vh;

		&-head {
			display: flex;
			align-items: center;
			justify-content: space-between;
			width: 750rpx;
			height: 220rpx;
			font-size: 24rpx;
			color: #FFFFFF;
			background: linear-gradient(to right, #FF8732 45%, #FFB65E 78%, #FFB45C 100%, #FFB65E 100%);
			padding-left: 40rpx;

			&-icon {
				display: flex;
				justify-content: center;
				align-items: center;

				image {
					width: 60rpx;
					height: 54rpx;
					background-size: 100%;
					margin-right: 10rpx;
				}
			}

			&-text {
				margin-right: 120rpx;
				margin-top: 15rpx;
			}

		}

		&-aside {
			width: 670rpx;
			height: 124rpx;
			background: #fff;
			border-radius: 10rpx;
			margin: 0 auto;
			margin-top: -50rpx;
			display: flex;
			align-items: center;

			image {
				width: 23rpx;
				height: 27rpx;
				background-size: 100%;
				padding: 0 20rpx;
			}

			&-addr {
				font-size: 24rpx;

				view {
					&:nth-child(1) {
						color: #3D3D3D;
						line-height: 2;
					}

					&:nth-child(2) {
						color: #989898;
					}
				}
			}
		}

		&-info {
			display: flex;
			align-items: center;
			width: 670rpx;
			// height: 212rpx;
			padding: 20rpx 0;
			background: #fff;
			margin: 20rpx auto;
			border-radius: 10rpx;

			&-left {
				width: 120rpx;
				height: 120rpx;
				padding: 0 20rpx;
				flex-shrink: 0;

				image {
					width: 100%;
					height: 100%;
					background-size: 100%;
				}
			}

			&-right {
				padding-right: 30rpx;

				&-title {
					font-size: 24rpx;
					font-weight: 500;
					color: #3D3D3D;
				}

				&-space {
					color: #989898;
					font-size: 24rpx;
					line-height: 2;
				}

				&-money {
					display: flex;
					justify-content: space-between;
					font-size: 24rpx;

					view {
						&:nth-child(1) {
							color: #E12626;
							flex: 1;
						}

						&:nth-child(2) {
							color: #3D3D3D;
						}
					}
				}
			}
		}

		&-card {
			width: 670rpx;
			padding: 20rpx 0;
			margin: 0 auto;
			background: #fff;
			border-radius: 10rpx;

			&-cell {
				display: flex;
				justify-content: space-between;
				padding: 10rpx 30rpx;
				font-size: 24rpx;
				color: #3D3D3D;
			}
		}

		&-footer {
			display: flex;
			justify-content: flex-end;
			align-items: center;
			width: 650rpx;
			height: 80rpx;
			background: #fff;
			border-radius: 10rpx;
			padding-right: 20rpx;
			margin: 20rpx auto;

			&-btn {
				width: 130rpx;
				height: 42rpx;
				background: #fff;
				color: #3D3D3D;
				line-height: 42rpx;
				text-align: center;
				border: 1px solid #3D3D3D;
				border-radius: 50rpx;
				font-size: 24rpx;
				margin: 0 10rpx;
			}
		}
	}
</style>